//
//  Loan_OperatorAccreditCommonView.m
//  JinFuThree
//
//  Created by 爱尚 on 2018/9/19.
//  Copyright © 2018年 毛韶谦. All rights reserved.
//

#import "Loan_OperatorAccreditCommonView.h"

@implementation Loan_OperatorAccreditCommonView

-(instancetype)init{
    self = [super init];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        [self initViews];
    }
    return self;
}

-(void)initViews{
    
    
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.mas_left).offset(20);
        make.centerY.mas_equalTo(self);
        make.height.mas_offset(@15);
        make.width.mas_offset(@70);
    }];
    
    
    [self.writeTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.height.mas_equalTo(self.titleLabel);
        make.left.mas_equalTo(self.titleLabel.mas_left);
        make.right.mas_equalTo(self.mas_right).offset(-20);
        
    }];
    
    //设置底部线条
    [self.lineImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(self.titleLabel.mas_left);
        make.right.mas_equalTo(self.writeTextField.mas_right);
        make.bottom.mas_equalTo(self.mas_bottom);
        make.height.equalTo(@0.5f);
    }];
    
    
    
}

-(UILabel *)titleLabel{
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc]init];
        _titleLabel.textColor = ThemeMaoBlackColor;
        _titleLabel.font = UIFontMaoNormal;
        [self addSubview:_titleLabel];
    }
    return _titleLabel;
    
}

-(MSQTextField *)writeTextField{
    if (!_writeTextField) {
        _writeTextField = [[MSQTextField alloc]init];
        _writeTextField.textColor = ThemeMaoBlackColor;
        _writeTextField.font = UIFontMaoNormal;
        _writeTextField.textAlignment = NSTextAlignmentRight;
        [self addSubview:_writeTextField];
    }
    return _writeTextField;
}

-(UIImageView *)lineImageView{
    if (!_lineImageView) {
        
        _lineImageView = [[UIImageView alloc]init];
        _lineImageView.backgroundColor = ThemeMaoLineColor;
        _lineImageView.layer.cornerRadius = 0.25;
        _lineImageView.layer.masksToBounds = YES;
        [self addSubview:_lineImageView];
        
    }
    return _lineImageView;
}




















@end
